package com.rao.gmall.feign.product;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rao.gmall.feign.product.fallback.SpuFeignClientFallback;
import com.rao.gmall.model.product.SpuInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author nzmxfan
 * @create 2021-08-08-17:00
 */
@RequestMapping("/admin/product")
@FeignClient(value = "service-product",fallback = SpuFeignClientFallback.class)
public interface SpuFeignClient {

    @GetMapping("/{page}/{limit}")
    Page<SpuInfo> spuInfoPageList(@RequestParam("category3Id") Long category3Id,
                                  @PathVariable("page") Long page,
                                  @PathVariable("limit") Long limit);

}
